<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/18
 * Time: 13:49
 */

namespace app\common\model;

use app\common\model\Base;
class Admin extends Base
{
//    protected $pk = 'id';
//    protected $table = 'ck_admin';
    # 开启自动写入时间戳字段,也可以在database配置文件中开启全局的配置
    protected $autoWriteTimestamp = true;

//    protected $createTime = 'create_time';
//    protected $updateTime = 'update_time';

    protected $dateFormat = 'Y-m-d';

    # 获取器
    public function getEnableAttr($value){
        $status = ['禁用', '启用'];
        return $status[$value];
    }

}